package basic;

import java.util.ArrayList;
import java.util.Arrays;
import java.util.List;

/**
 * Created on 2019/3/11.
 */
public class MethodDataChange {
    public static void main(String[] args) {
        String a = new String("abc");
        int b = 5;
        int[] c={1,2,3,4};
        Object[] co={1,2,3,4};
        changeInt(a,b,c,co);
        System.out.println(a +"-"+ b +"-"+ Arrays.toString(c));

        //匿名内部类
        List aaa  = new ArrayList(){
            @Override
            public boolean add(Object o) {
                return super.add(o + "45");
            }
            {

                add("123");
            }
        };
        System.out.println(aaa);
//        System.out.println(Arrays.toString(co));
    }

    public static void changeInt(String a, int b, int[] c, Object[] co) {
        a = "123456";
        b = 10;
        int temp ;
        for (int i = 0; i < c.length/2; i++) {
            temp = c[i];
            int i1 = c.length - 1 - i;
            c[i] = c[i1];
            c[i1] = temp;
        }
        c = new int[]{1,2,3,4};
//        c[0] = 5;


    }
}